home *** CD-ROM | disk | FTP | other *** search
- #pragma once
-
- /*=======================================================================*/
- /*= This file contains a set of utilities for converting text & strings =*/
- /*=======================================================================*/
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- Ptr Data2Ptr (void *InData, short DataLen);
- /* return a new pointer containing DataLen bytes of InData */
-
- StringPtr Data2PString (void *InData, short DataLen);
- /* return a new pointer containing a pstring constructed from InData */
-
- StringPtr Text2PString (Handle TheString);
- /* given a handle to a raw text string, return a pointer to a Pascal style string */
-
- Handle PString2Text (StringPtr TheString);
- /* given a Pascal string, return a handle to the raw text it contained */
-
- void CToPString (char *CStr, Str255 *PStr, short maxLen);
- /* convert maxLen characters of the the c string passed in CStr into a */
- /* pascal-syle string. PStr must already by allocated */
-
- void PToCString (StringPtr PString, char *CStr, short maxLen);
- /* convert maxLen characters of the the pascal string passed in PStr into a */
- /* c-syle string. CStr must already by allocated */
-
- #ifdef __cplusplus
- }
- #endif